$(document).ready(function() {
	var $overflow = '';
	var colorbox_params = {
		rel: 'colorbox',
		reposition: true,
		scalePhotos: true,
		scrolling: false,
		previous: '<i class="ace-icon fa fa-arrow-left"></i>',
		next: '<i class="ace-icon fa fa-arrow-right"></i>',
		close: '&times;',
		current: '第{current}张/共{total}张',
		maxWidth: '100%',
		maxHeight: '100%',
		onOpen:function(){
			$overflow = document.body.style.overflow;
			document.body.style.overflow = 'hidden';
		},
		onClosed:function(){
			document.body.style.overflow = $overflow;
		},
		onComplete:function(){
			$.colorbox.resize();
		}
	};

	$('.ace-thumbnails [data-rel="colorbox"]').colorbox(colorbox_params);
})